<template>
<div>
  <span>123 {{ site }}</span><br />
  <button @click="countReduce">Reduce</button>
  <span>count：{{ count }} </span>
  <button @click="countAdd">ADD</button>
</div>
</template>

<script>
export default {
  created () {
    console.log(this.$route)
  },
  computed: {
    count () {
      return this.$store.state.count
    },
    site () {
      return this.$route.params.city
    }
  },
  methods: {
    countAdd () {
      this.$store.commit('add')
    },
    countReduce () {
      this.$store.commit('reduce')
    }
  }
}
</script>

<style>

</style>
